//
//  CSL_Search_singerCell.m
//  HZ_Beautiful_Music
//
//  Created by dllo on 16/4/1.
//  Copyright © 2016年 ui. All rights reserved.
//

#import "CSL_Search_singerCell.h"

@implementation CSL_Search_singerCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.headImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
//        _headImageView.backgroundColor = [UIColor redColor];
        _headImageView.layer.cornerRadius = (self.bounds.size.width/6) / 2;//设置图片为圆形
        _headImageView.layer.masksToBounds = YES;
        [self.contentView addSubview:_headImageView];
        
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
//        _titleLabel.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_titleLabel];
        //歌曲
        self.singleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
//        _singleLabel.backgroundColor = [UIColor redColor];
        _singleLabel.font = [UIFont systemFontOfSize:12];
        _singleLabel.textColor = [UIColor grayColor];
        [self.contentView addSubview:_singleLabel];
        //专辑
        self.albumLabel = [[UILabel alloc] initWithFrame:CGRectZero];
//        _albumLabel.backgroundColor = [UIColor redColor];
        _albumLabel.font = [UIFont systemFontOfSize:12];
        _albumLabel.textColor = [UIColor grayColor];
        [self.contentView addSubview:_albumLabel];
        
        self.jImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
//        _jImageView.backgroundColor = [UIColor redColor];
        _jImageView.image = [[UIImage imageNamed:@"jiantou64"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        [self.contentView addSubview:_jImageView];
        
        self.footView = [[UIView alloc] initWithFrame:CGRectZero];
        _footView.backgroundColor = [UIColor colorWithWhite:0.826 alpha:1.000];
        [self.contentView addSubview:_footView];
        
    }
    return self;
}

-(void)layoutSubviews {
    [super layoutSubviews];
    _headImageView.frame = CGRectMake(self.bounds.size.width/20, self.bounds.size.height/6, self.bounds.size.width/6, self.bounds.size.height/1.3);
    _titleLabel.frame = CGRectMake(self.bounds.size.width/4, self.bounds.size.height/4, self.bounds.size.width/2, self.bounds.size.height/3);
    _singleLabel.frame = CGRectMake(self.bounds.size.width/4, self.bounds.size.height/1.5, self.bounds.size.width/5, self.bounds.size.height/4);
    _albumLabel.frame = CGRectMake(self.bounds.size.width/2, self.bounds.size.height/1.5, self.bounds.size.width/4, self.bounds.size.height/4);
    _jImageView.frame = CGRectMake(self.bounds.size.width/1.1, self.bounds.size.height/2.5, self.bounds.size.width/20, self.bounds.size.height/4);
    _footView.frame = CGRectMake(0, self.bounds.size.height - 1, self.bounds.size.width, 1);

}






@end
